$(function () {
    $('.bars').click(function () {
        $('header').toggleClass('header-block')
        $(this).toggleClass('bars-active')
        $('.m-navbar').toggleClass('block')
    })


    $('.m-toggle-btn').click(function () {
        $('.m-toggle-btn').removeClass('active')
        $(this).addClass('active')
        $('.drapdown-menu').removeClass('visible')
        $(this).next('.drapdown-menu').toggleClass('visible')
    })


    var mMenu = $('.m-menu-list')
    mMenu.on('click', "li", function () {
        $(this).addClass('active').siblings().removeClass('active')
        $(this).find('.m-menu-children').css({display: 'block'})
    })

    $('.m-menu-icon').click(function () {
        mMenu.css({display: 'block'})
        mMenu.animate({height: '352px'})
    })

    var swiper = new Swiper('.swiper-container', {
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
        autoplay: {
            delay: 2500,
            disableOnInteraction: false,
        },
        effect: 'fade',
    });

    $('#swiper_container').hover(function () {
        swiper.autoplay.stop();
    }, function () {
        swiper.autoplay.start();
    });
})